package com.zh.demo.service;
import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zh.demo.mapping.CarMapping;
import com.zh.demo.model.Car;

@Service
public class CarService {
	private static Logger logger = Logger.getLogger(CarService.class);
	
	@Resource
	private CarMapping carm;
	@Transactional
	public List<Car> show() {
		return carm.show();
		
	}
	@Transactional
	public int add(Car car) {
		// TODO Auto-generated method stub
		return carm.add(car);
	}

}
